/**
 * 
 */
$(function(){
	var $user_photo_path = $("#avatar2");
	var $user_nickname = $("#user_nickname");   //用户昵称
	var $user_level = $("#c_user_level");
	var $user_integral = $("#user_integral");
	var $user_sex = $("#user_sex");
	var $user_hobby = $("#user_hobby");
	var $user_birthday = $("#user_birthday");
	var $user_birth_place = $("#user_birth_place");
	var $user_qq = $("#user_qq");
	var $user_introduction = $("#user_introduction");
  $.get("User_data",function(data,status){
	  if(data.result==true){
		  
		  if(data.user_photo_path!=null&&data.user_photo_path!=""){
			  $user_photo_path[0].src=data.user_photo_path;
		  }else{
			  $user_photo_path[0].src="images/no_photo.jpg";
		  }
		  
		  if(data.user_nickname!=null&&data.user_nickname!=""){
			  $user_nickname.html(data.user_nickname);
		  }else{
			  $user_nickname.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_level!=null&&data.user_level!=""){
			  $user_level.html(data.user_level);
		  }else{
			  $user_level.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_integral!=null&&data.user_integral!=""){
			  $user_integral.html(data.user_integral);
		  }else{
			  $user_integral.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_sex!=null&&data.user_sex!=""){
			  $user_sex.html(data.user_sex);
		  }else{
			  $user_sex.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_hobby!=null&&data.user_hobby!=""){
			  $user_hobby.html(data.user_hobby);
		  }else{
			  $user_hobby.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_birthday!=null&&data.user_birthday!=""){
			  $user_birthday.html(data.user_birthday);
		  }else{
			  $user_birthday.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		 
		  if(data.user_birth_place!=null&&data.user_birth_place!=""){
		  $user_birth_place.html(data.user_birth_place);
		  }else{
			  $user_birth_place.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_qq!=null&&data.user_qq!=""){
			  $user_qq.html(data.user_qq);
		  }else{
			  $user_qq.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
		  if(data.user_introduction!=null&&data.user_introduction!=""){
			  $user_introduction.html(data.user_introduction);
		  }else{
			  $user_introduction.html("<a href='account-safe.jsp'>尚未完善</a>");
		  }
		  
	  }else{
		  alert("出错");
	  }
  },"json");
});

